#include "mainwindow.h"
#include "frm_login.h"
#include "defaultpage.h"
#include "querypackage.h"
#include "controller.h"
#include "uimanager.h"
#include "queryresult.h"
#include <QApplication>
#include <QDialog>
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    qRegisterMetaType<QueryPackage*>("QueryPackage*");
    qRegisterMetaType<OneWayQuery*>("OneWayQuery*");
    qRegisterMetaType<RoundTripQuery*>("RoundTripQuery*");
    qRegisterMetaType<OnSaleQuery*>("OnSaleQuery*");
    qRegisterMetaType<CheckPointQuery*>("CheckPointQuery*");
    qRegisterMetaType<User*>("User*");
    qRegisterMetaType<QueryResult*>("QueryResult*");
    qRegisterMetaType<User>("User");
    Controller* ct = new Controller();
    UIManager* mani = new UIManager(ct);
    ct->setUIManager(mani);
    //a.setQuitOnLastWindowClosed(false);
    ct->Start();
    a.exec();
    delete ct;
    return 0;
}
